import request from '@/utils/request'

// 查询租车订单实例列表
export function listVhiceodr(query) {
  return request({
    url: '/merchant/vhiceodr/list',
    method: 'get',
    params: query
  })
}

// 新增租车订单实例
export function addVhiceodr(data) {
  return request({
    url: '/merchant/vhiceodr',
    method: 'post',
    data: data
  })
}

// 修改租车订单实例
export function updateVhiceodr(data) {
  return request({
    url: '/merchant/vhiceodr',
    method: 'put',
    data: data
  })
}

export function getOeaiRcrList(query) {
  return request({
    url: '/merchant/vhiceodr/getOeaiRcrList/'+query,
    method: 'get'
  })
}

export function getVhiceodr(data) {
  return request({
    url: '/merchant/vhiceodr/' + data,
    method: 'get'
  })
}

export function assignOrders(data) {
  return request({
    url: '/merchant/vhiceodr/assignOrders',
    method: 'post',
    data: data
  })
}

export function updateOrderMoney(id, orderNum, totalMoney) {
  const data = {
    id,
    orderNum,
    totalMoney
  }
  return request({
    url: '/merchant/vhiceodr/editMoney',
    method: 'put',
    data: data
  })
}

export function listVhiceodrByPage() {
  return request({
    url: '/merchant/vhiceodr/list',
    method: 'get'
  })
}
